home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Safarir 3
/
SafTV-CD3.iso
/
pc
/
Bonus
/
Dessins Animés
/
static
/
jeux
/
napman.swf
/
scripts
/
frame_330
/
DoAction.as
Wrap
Text File
|
2001-11-21
|
2KB
|
104 lines
if(mangiato2 == "0")
{
px4 = int(f2x / "4");
py4 = int(f2y / "4");
restox = f2x - px4 * "4";
restoy = f2y - py4 * "4";
if(restox == "0" and restoy == "0")
{
x = f2x;
y = f2y;
call("evaluate");
xv = f2vx;
yv = f2vy;
call("controlla");
if(ok == "1")
{
f2vx = xvs;
f2vy = yvs;
call("ruotafan");
}
}
setProperty("/f2", _X, f2x * "4" + "8");
setProperty("/f2", _Y, f2y * "4" + "8");
if(f2vx == "1")
{
pros = "3";
}
else
{
pros = "0";
}
if(f2vy == "1")
{
prosy = "3";
}
else
{
prosy = "0";
}
tpx = f2x + f2vx + pros;
tpy = f2y + f2vy + prosy;
cosa = eval("r" add int(tpy / "4")).substr(int(tpx / "4") + "1","1");
if(cosa ne "X" and cosa ne "T" and cosa ne "R")
{
f2x += f2vx;
f2y += f2vy;
}
else
{
x = f2x;
y = f2y;
call("evaluate");
f2vx = xvs;
f2vy = yvs;
call("ruotafan");
}
if((px - f2x) * (px - f2x) < "10" and (py - f2y) * (py - f2y) < "10")
{
if(status == "1")
{
score += "100";
mangiato2 = "1";
tellTarget("/f2")
{
gotoAndStop(9);
}
tellTarget("/suoni")
{
gotoAndStop("magna");
play();
}
}
else
{
gameover = "1";
}
}
}
else
{
if(f2y < "56")
{
f2y += "1";
}
if("56" < f2y)
{
f2y -= "1";
}
if("56" < f2x)
{
f2x -= "1";
}
if(f2x < "56")
{
f2x += "1";
}
setProperty("/f2", _X, f2x * "4" + "8");
setProperty("/f2", _Y, f2y * "4" + "8");
if(f2y == "56" and f2x == "56")
{
mangiato2 = "0";
}
}